/**
 * 
 */
package com.how2java.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.how2java.mapper.UserMapper;
import com.how2java.pojo.User;
import com.how2java.service.UserService;
import com.how2java.util.Page;

/**
 * @author LMH
 * @version 创建时间：2019年5月6日 下午3:31:26
 */
@Service
public class UserServiceImpl implements UserService{
	@Autowired
	UserMapper userMapper;

	@Override
	public int add(User user) {
		return userMapper.add(user);
	}

	@Override
	public void delete(int id) {
		userMapper.delete(id);
	}

	@Override
	public User get(int id) {
		return userMapper.get(id);
	}

	@Override
	public int update(User user) {
		return userMapper.update(user);
	}

	@Override
	public List<User> list() {
		return userMapper.list();
	}

	@Override
	public List<User> list(Page page) {
		return userMapper.list(page);
	}

	@Override
	public Map getAll(int id) {
		return userMapper.getAll(id);
	}
//	@Override
//	public List<Map> getAll(int id) {
//		return userMapper.getAll(id);
//	}

	/* (non-Javadoc)
	 * @see com.how2java.service.UserService#getMore(int)
	 */
	@Override
	public List<Map> getMore(int age) {
		// TODO Auto-generated method stub
		return userMapper.getMore(age);
	}

}
